﻿using System;

    class FighterAtack
    {
        static void Main()
        {
            int PX1=int.Parse(Console.ReadLine());
            int PY1=int.Parse(Console.ReadLine());
            int PX2=int.Parse(Console.ReadLine());
            int PY2=int.Parse(Console.ReadLine());
            int FX=int.Parse(Console.ReadLine());
            int FY=int.Parse(Console.ReadLine());
            int D = int.Parse(Console.ReadLine());
            int damage = 0;
            int maxX =Math.Max(PX1,PX2);
            int minX = Math.Min(PX1, PX2);
            int maxY = Math.Max(PY1, PY2);
            int minY  = Math.Min(PY1, PY2);
            if (((FX + D) == (maxX)) && (((FY) == (minY)) || ((FY) == (maxY))))
            {
                damage += 150;
                goto result;
            }
            if (((FX + D) == (maxX)) && (((FY) > (minY + 1)) || ((FY) < (maxY - 1))))
            {
                damage += 200;
                goto result;
            }
            if (((FX + D) > (minX)) && ((FX + D+1) < (maxX)) && ((FY) > (minY)) && ((FY) < (maxY)))
            {
                damage += 275;
                goto result;
            }
            if (((FX + D) > (minX)) && ((FX + D+1) < (maxX - 1)) && (((FY) == (minY)) || ((FY) == (maxY))))
            {
                damage += 225;
                goto result;
            }
            if (((FX + D) >= ((minX)) && ((FX + D) <= (maxX))) && (((FY) == (minY + 2)) || ((FY) == (maxY - 2))))
            {
                damage += 50;
                goto result;
            }
            if (((FX + D) == (minX - 1)) && ((FY) >= (minY ))&&((FY)<= (maxY)))
            {
                damage += 75;
                goto result;
            }
            
            result:
            
            Console.WriteLine("{0}%",damage);
        }
    }